﻿using OdaOperation.Utils;
using Teigha.Core;

namespace OdaOperation.Model
{
    /// <summary>
    /// 标注样式设置
    /// </summary>
    public class DimStyleModel
    {
        /// <summary>
        /// 标注样式名称
        /// </summary>
        public string DimStyleName { get; set; } = "defaultStyle";

        /// <summary>
        /// 标注文字样式名称
        /// </summary>
        public string DimtxstyName { get; set; }

        /// <summary>
        /// 第一个标注箭头块的类型
        /// </summary>
        public Dimblk Dimblk1 { get; set; } = Dimblk._ArchTick;

        /// <summary>
        /// 第二个标注箭头块的类型
        /// </summary>
        public Dimblk Dimblk2 { get; set; } = Dimblk._ArchTick;

        /// <summary>
        /// 箭头的大小
        /// </summary>
        public double Dimasz { get; set; } = 2.5;

        /// <summary>
        /// 标注线的线宽
        /// </summary>
        public LineWeight Dimlwd { get; set; } = LineWeight.kLnWtByBlock;

        /// <summary>
        /// 延伸线的线宽
        /// </summary>
        public LineWeight Dimlwe { get; set; } = LineWeight.kLnWtByBlock;

        /// <summary>
        /// 第一个标注线是否省略
        /// </summary>
        public bool Dimsd1 { get; set; }

        /// <summary>
        /// 第二个标注线是否省略
        /// </summary>
        public bool Dimsd2 { get; set; }

        /// <summary>
        /// 标注线的颜色
        /// </summary>
        public string Dimclrd { get; set; } = "ByLayer";

        /// <summary>
        /// 标注线的线型
        /// </summary>
        public string Dimltype { get; set; } = "ByLayer";

        /// <summary>
        /// 标注线的延长
        /// </summary>
        public double Dimdle { get; set; }

        /// <summary>
        /// 第一个延伸线的线型
        /// </summary>
        public string Dimltex1 { get; set; } = "ByLayer";

        /// <summary>
        /// 第二个延伸线的线型
        /// </summary>
        public string Dimltex2 { get; set; } = "ByLayer";

        /// <summary>
        /// 第一个延伸线是否省略
        /// </summary>
        public bool Dimse1 { get; set; }

        /// <summary>
        /// 第二个延伸线是否省略
        /// </summary>
        public bool Dimse2 { get; set; }

        /// <summary>
        /// 固定标注线长度是否启用
        /// </summary>
        public bool Dimfxlon { get; set; }

        /// <summary>
        /// 固定标注线长度
        /// </summary>
        public double Dimfxl { get; set; } = 1.0;

        /// <summary>
        /// 延伸线的颜色
        /// </summary>
        public string Dimclre { get; set; } = "ByLayer";

        /// <summary>
        /// 延伸线的延长长度
        /// </summary>
        public double Dimexe { get; set; } = 2.5;

        /// <summary>
        /// 延伸线的偏移
        /// </summary>
        public double Dimexo { get; set; } = 3.0;

        /// <summary>
        /// 标注文字填充颜色
        /// </summary>
        public string Dimtfillclr { get; set; }

        /// <summary>
        /// 标注文字颜色
        /// </summary>
        public string Dimclrt { get; set; } = "255,255,255";

        /// <summary>
        /// 标注文字高度
        /// </summary>
        public double Dimtxt { get; set; } = 3.0;

        /// <summary>
        /// 标注文字与标注线的间隔
        /// </summary>
        public double Dimgap { get; set; } = 1.0;

        /// <summary>
        /// 标注文字是否水平对齐
        /// </summary>
        public bool Dimtoh { get; set; }

        /// <summary>
        /// 是否启用极限尺寸
        /// </summary>
        public bool Dimlim { get; set; }

        /// <summary>
        /// 标注文字的对齐方向
        /// </summary>
        public short Dimtad { get; set; } = 1;

        /// <summary>
        /// 标注文字是否垂直对齐
        /// </summary>
        public bool Dimtih { get; set; }

        /// <summary>
        /// 标注的比例因子
        /// </summary>
        public double Dimscale { get; set; } = 100.0;

        /// <summary>
        /// 小数精度
        /// </summary>
        public short Dimdec { get; set; }

        /// <summary>
        /// 标注文字是否在尺寸线内部
        /// </summary>
        public bool Dimtix { get; set; } = true;

        /// <summary>
        /// 是否对标注的实际尺寸进行覆盖
        /// </summary>
        public bool Dimsoxd { get; set; }

        /// <summary>
        /// 标注文字移动的规则
        /// </summary>
        public short Dimtmove { get; set; } = 2;

        /// <summary>
        /// 是否启用标注线的覆盖
        /// </summary>
        public bool Dimtofl { get; set; } = true;
    }
}
